﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="StandardStyles.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="LabelTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BodyTextStyle}">
        <Setter Property="Margin" Value="0,20,0,8" />
        <Setter Property="FontSize" Value="12" />
    </Style>

    <Style x:Key="ValueTextStyle" TargetType="TextBlock" BasedOn="{StaticResource ItemTextStyle}">
        <Setter Property="FontSize" Value="28" />
        <Setter Property="FontWeight" Value="SemiLight" />
    </Style>
    
    <Style x:Key="ValueInputStyle" TargetType="TextBox">
        <Setter Property="Height" Value="48"/>
    	<Setter Property="MinWidth" Value="{StaticResource TextControlThemeMinWidth}"/>
    	<Setter Property="MinHeight" Value="{StaticResource TextControlThemeMinHeight}"/>
    	<Setter Property="Foreground" Value="{StaticResource TextBoxForegroundThemeBrush}"/>
    	<Setter Property="Background" Value="{StaticResource TextBoxBackgroundThemeBrush}"/>
    	<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderThemeBrush}"/>
    	<Setter Property="BorderThickness" Value="{StaticResource TextControlBorderThemeThickness}"/>
    	<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
    	<Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
    	<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>
    	<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
    	<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False"/>
    	<Setter Property="Padding" Value="{StaticResource TextControlThemePadding}"/>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="TextBox">
    				<Grid>
    					<Grid.Resources>
    						<Style x:Name="DeleteButtonStyle" TargetType="Button">
    							<Setter Property="Template">
    								<Setter.Value>
    									<ControlTemplate TargetType="Button">
    										<Grid>
    											<VisualStateManager.VisualStateGroups>
    												<VisualStateGroup x:Name="CommonStates">
    													<VisualState x:Name="Normal"/>
    													<VisualState x:Name="PointerOver">
    														<Storyboard>
    															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="BackgroundElement">
    																<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPointerOverBackgroundThemeBrush}"/>
    															</ObjectAnimationUsingKeyFrames>
    															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BorderElement">
    																<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPointerOverBorderThemeBrush}"/>
    															</ObjectAnimationUsingKeyFrames>
    															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="GlyphElement">
    																<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPointerOverForegroundThemeBrush}"/>
    															</ObjectAnimationUsingKeyFrames>
    														</Storyboard>
    													</VisualState>
    													<VisualState x:Name="Pressed">
    														<Storyboard>
    															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="BackgroundElement">
    																<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPressedBackgroundThemeBrush}"/>
    															</ObjectAnimationUsingKeyFrames>
    															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BorderElement">
    																<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPressedBorderThemeBrush}"/>
    															</ObjectAnimationUsingKeyFrames>
    															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="GlyphElement">
    																<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPressedForegroundThemeBrush}"/>
    															</ObjectAnimationUsingKeyFrames>
    														</Storyboard>
    													</VisualState>
    													<VisualState x:Name="Disabled">
    														<Storyboard>
    															<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundElement"/>
    															<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BorderElement"/>
    														</Storyboard>
    													</VisualState>
    												</VisualStateGroup>
    											</VisualStateManager.VisualStateGroups>
    											<Border x:Name="BorderElement" BorderBrush="{StaticResource TextBoxButtonBorderThemeBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
    											<Border x:Name="BackgroundElement" Background="{StaticResource TextBoxButtonBackgroundThemeBrush}" Margin="{TemplateBinding BorderThickness}">
    												<TextBlock x:Name="GlyphElement" Foreground="{StaticResource TextBoxButtonForegroundThemeBrush}" FontFamily="{StaticResource SymbolThemeFontFamily}" HorizontalAlignment="Center" Text="&#xE0A4;" VerticalAlignment="Center"/>
    											</Border>
    										</Grid>
    									</ControlTemplate>
    								</Setter.Value>
    							</Setter>
    						</Style>
    					</Grid.Resources>
    					<Grid.ColumnDefinitions>
    						<ColumnDefinition Width="*"/>
    						<ColumnDefinition Width="Auto"/>
    					</Grid.ColumnDefinitions>
    					<VisualStateManager.VisualStateGroups>
    						<VisualStateGroup x:Name="CommonStates">
    							<VisualState x:Name="Disabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentElement">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxDisabledForegroundThemeBrush}"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="Normal">
    								<Storyboard>
    									<DoubleAnimation Duration="0" To="{StaticResource TextControlBackgroundThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundElement"/>
    									<DoubleAnimation Duration="0" To="{StaticResource TextControlBorderThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BorderElement"/>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="PointerOver">
    								<Storyboard>
    									<DoubleAnimation Duration="0" To="{StaticResource TextControlPointerOverBackgroundThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundElement"/>
    									<DoubleAnimation Duration="0" To="{StaticResource TextControlPointerOverBorderThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BorderElement"/>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="Focused"/>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="ButtonStates">
    							<VisualState x:Name="ButtonVisible">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DeleteButton">
    										<DiscreteObjectKeyFrame KeyTime="0">
    											<DiscreteObjectKeyFrame.Value>
    												<Visibility>Visible</Visibility>
    											</DiscreteObjectKeyFrame.Value>
    										</DiscreteObjectKeyFrame>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="ButtonCollapsed"/>
    						</VisualStateGroup>
    					</VisualStateManager.VisualStateGroups>
                        
    					<Border x:Name="BackgroundElement" Background="#34FFFFFF" Grid.ColumnSpan="2" Margin="{TemplateBinding BorderThickness}"/>
    					<Border x:Name="BorderElement" BorderBrush="#7FFFFFFF" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2"/>
    					<ScrollViewer x:Name="ContentElement" HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsTabStop="False" IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" Margin="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" ZoomMode="Disabled" FontSize="28" FontWeight="SemiLight" Foreground="White" />
    					<Button x:Name="DeleteButton" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="1" FontSize="{TemplateBinding FontSize}" IsTabStop="False" Style="{StaticResource DeleteButtonStyle}" Visibility="Collapsed" VerticalAlignment="Stretch"/>
    				</Grid>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
</ResourceDictionary>
